//
//  QDRecordIndexViewController.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/2/27.
//  Copyright © 2019 YueWen. All rights reserved.
//

import UIKit

/// 乘车记录
final class QDRecordIndexViewController: QDLargeTitleViewController {
    
    override var titles: [String] {
        return ["地铁乘车记录","公交乘车记录"];
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view.
        hidesBottomBarWhenPushed = true
        largeTableHeaderView.title = "乘车记录"
    }
    
    
    /// 点击
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
        let title = titles[indexPath.row]
        let viewController =  QDRecordTableViewController()
        
        switch title {
        case "地铁乘车记录": viewController.type = .metro
        case "公交乘车记录": viewController.type = .bus
        default: break
        }
        
        ritl_topNavigationPush(viewController, animated: true)
    }

}
